/*
 * @Author: your name
 * @Date: 2021-05-19 17:22:23
 * @LastEditTime: 2021-05-26 17:16:45
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /xiangpan-admin/src/pages/home/scheduModal/index.tsx
 */
import { IFormTypeEnum } from '@/components/form/formComponent'
import { Modal } from 'antd'
import HeaderForm from '@/components/form'

import React from 'react'
interface IProps {
  visible: boolean,
  close: () => void
}
interface IProps {
}

const GoodsModal = (props: IProps) => {
  const List = [{
    key: 'goods_name',
    type: IFormTypeEnum.Input,
    label: '商品名称',
    rules: [{ required: true }]
  }, {
    key: 'goods_price',
    type: IFormTypeEnum.InputNumber,
    label: '价格',
    rules: [{ required: true }]
  }, {
    key: 'goods_inventory',
    type: IFormTypeEnum.InputNumber,
    label: '库存',
    rules: [{ required: true }]
  }]
  return (
    <Modal maskClosable={false} visible={props.visible} title={'编辑商品'} footer={null} onCancel={props.close}>
      <HeaderForm
        labelwidth={80}
        layout='horizontal'
        list={List}
        onFinish={(form) => {
          console.log(form, 'form==');
        }}
      />

    </Modal>
  )
}
export default GoodsModal